package com.zudada.servermain.POJO.DTO;

import lombok.Data;

import javax.validation.constraints.NotBlank;
import javax.validation.constraints.Pattern;
import io.swagger.annotations.ApiModelProperty;

@Data
public class PortAddDTO {
    //港口id是要自己输出还是自动生成？
    @ApiModelProperty("港口ID")
    @NotBlank(message = "港口ID不能为空")
    private String portId;

    @ApiModelProperty("港口名称")
    private String portName;

    @ApiModelProperty("所属区域")
    private String region;

    @ApiModelProperty("位置，格式(经度,纬度)")
    @Pattern(regexp = "^\\(-?\\d+(\\.\\d+)?,-?\\d+(\\.\\d+)?\\)$", message = "位置格式不正确，应为(经度,纬度)格式，例如：(121.6144,38.9138) 或 (100,100)")
    private String location;

    @ApiModelProperty("港口类型")
    private String portType;

    @ApiModelProperty("状态：正常/维护中")
    @Pattern(regexp = "^(正常|维护中)$", message = "状态只能是'正常'或'维护中'")
    private String status;

}
